<?php
/*
	服务公司：沧州讯呗网络科技有限公司
	作者：sun
*/
namespace App\Http\Controllers\Web;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Repositories\BannerRepository;
use App\Traits\BaseFun;
use App\Traits\FeiE;

class IndexController extends Controller
{
    public function __construct(BannerRepository $BannerRepository)
    {
        $this->BannerRepository=$BannerRepository;
    }
    public function Banner(Request $request)
    {   
          
        $res = $this->BannerRepository->list(['state'=>1]);
        if ($res) {
           $ArrDate = ['state' => 0, 'data' => $res, 'token' => $request->input('token')];
        }else{
           $ArrDate = ['state' => 2, 'data' => $res, 'msg' => '获取失败!']; 
        }
        return BaseFun::jsonReturn($ArrDate);
    }

}
